package com.xiao.springes.model;

import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

/**
 * @author: XiaoTing
 * @create: 2020-05-20 15:17
 * @description: 书实体
 **/
@Data
@Builder
@ToString(callSuper = true)
@Document(indexName = "book",type = "_doc")
public class BookBean {
    @Id
    private String id;
    /**
     * 标题
     */
    private String title;
    /**
     * 作者
     */
    private String author;
    /**
     * 发布时间
     */
    private String postDate;

    public BookBean(String id, String title, String author, String postDate) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.postDate = postDate;
    }

    public BookBean() {
    }
}
